package com.itheima.myobjectstream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Test2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //反序列化
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("myio\\a.txt"));
        Student s = (Student) ois.readObject();
        System.out.println(s);
        //进行关流
        ois.close();
    }
}
